package com.lfs.market.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lfs.market.model.entity.ChatMessage;

import java.util.List;

public interface ChatMessageService extends IService<ChatMessage> {
    /**
     * 保存消息
     *
     * @param messageList
     * @return
     */
    boolean saveList(List<String> messageList);

    /**
     * 获取聊天消息
     *
     * @param chatListId
     * @return
     */
    List<ChatMessage> getChatMessageList(String chatListId);

    /**
     * 当点击消息时，从redis中将未读的消息变为已读的消息
     *
     * @param chatListId
     * @return
     */
    void updateChatMessageIsRead(String chatListId);

}
